package com.tuozixuan.factory.simple3;

public class Client {

	public static void main(String[] args) throws InstantiationException, IllegalAccessException {
		
		VehicleFactory factory = new VehicleFactory();
		factory.registerVehicle(VehicleFactory.VehicleType.Bike.toString(), new Bike());
		factory.registerVehicle(VehicleFactory.VehicleType.Car.toString(), new Car());
		
		Vehicle vehicle = factory.createVehicle(VehicleFactory.VehicleType.Bike.toString());
		System.out.println("object:" +  vehicle);
	}

}
